home *** CD-ROM | disk | FTP | other *** search
- property iHltsprite, iHowManyButton, iCastHeight, iCastWidth, iEachButtonWidth, iHltpixel, iEachButtonHeight, iFullCast, iSearchPopOut, iHeader, IEachButtonHeightModes
- global gHltPixel, gFlashPixel, gModeHighltSprite, gSearchPopOut, gHeaderHere, gHoldSearchInfo, gFindBase, gColorMac, gComputerTypeK, gExtraSpeed, gDefaultENTRYstate, gDefaultENCstate, gHoldEncPixelSprite, gHoldEntPixelSprite, gSearchButton, gDefaultSearchstate, gInputFieldSpr, gDefaultTextstate, gDefaultPixelstate, gBtnHitSND
-
- on birth me, pWhichSprite, pHowMany, pcastMem, pWidth
- set iHltsprite to pWhichSprite
- set iHowManyButton to pHowMany + 0.0
- set iEachButtonWidth to pWidth + 0.0
- set iFullCast to pcastMem
- set iHeader to gHeaderHere
- set iHltpixel to gHltPixel
- return me
- end
-
- on mDumpParams me
- end
-
- on mHltHor me, pWhichSprite
- puppetSprite(iHltsprite, 1)
- set vMousePos to getAt(the clickLoc, 1)
- set vRelativeClick to vMousePos - the left of sprite iHltsprite
- set vWhere to integer((vRelativeClick / iEachButtonWidth) + 0.4999999)
- if vWhere < 1 then
- set vWhere to 1
- end if
- set whereVer to the top of sprite iHltsprite
- set whereHor to the left of sprite iHltsprite + ((vWhere - 1) * iEachButtonWidth)
- set vwhom to iFullCast + vWhere
- mSwitchHold(me, whereHor, whereVer, vwhom, pWhichSprite)
- return vWhere
- end
-
- on mHltKeyHor me
- puppetSprite(iHltsprite, 1)
- set vWhere to charToNum(the key)
- if vWhere > 96 then
- set vWhere to vWhere - 96
- else
- set vWhere to vWhere - 64
- end if
- set whereVer to the top of sprite iHltsprite
- set whereHor to the left of sprite iHltsprite + ((vWhere - 1) * iEachButtonWidth)
- set vwhom to iFullCast + vWhere
- mSwitchHold(me, whereHor, whereVer, vwhom, iHltpixel)
- return vWhere
- end
-
- on mLeaveMode me
- puppetSprite(iHltpixel, 0)
- puppetSprite(iHltsprite, 0)
- puppetSprite(iHeader, 0)
- updateStage()
- end
-
- on mSwitchCastHlt me, whereHor, whereVer, vwhom
- puppetSprite(gFlashPixel, 1)
- set the locH of sprite gFlashPixel to whereHor
- set the locV of sprite gFlashPixel to whereVer
- set the castNum of sprite gFlashPixel to vwhom
- updateStage()
- puppetSprite(gFlashPixel, 0)
- end
-
- on mHltfromScripts me, vWhere
- puppetSprite(iHltsprite, 1)
- set whereVer to the top of sprite iHltsprite
- set whereHor to the left of sprite iHltsprite + ((vWhere - 1) * iEachButtonWidth)
- set vwhom to iFullCast + vWhere
- mSwitchHold(me, whereHor, whereVer, vwhom, iHltpixel)
- end
-
- on mSwitchHold me, whereHor, whereVer, vwhom, whichpixel
- set vIsChanged to not (the puppet of sprite whichpixel) or (the locH of sprite whichpixel <> whereHor) or (the locV of sprite whichpixel <> whereVer)
- if vIsChanged then
- puppetSprite(whichpixel, 1)
- set the locH of sprite whichpixel to whereHor
- set the locV of sprite whichpixel to whereVer
- set the castNum of sprite whichpixel to vwhom
- updateStage()
- hearit(gBtnHitSND)
- end if
- end
-